using System;
using System.Collections;
using System.Collections.Generic;

using DATA.Base;

namespace DATA.BusinessObjects
{
    public partial class Khachhang : BusinessBase<string>
    {
        #region Declarations

		private string _tenKhachHang = null;
		private string _cmnd = null;
		private string _diaChi = null;
		
		private Loaikhach _loaikhach = null;
		
		private IList<Phieuthuephong> _phieuthuephongs = new List<Phieuthuephong>();
		private IList<Hoadon> _hoadons = new List<Hoadon>();
		
		#endregion

        #region Constructors

        public Khachhang() { }

        #endregion

        #region Methods

        public override int GetHashCode()
        {
            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            
            sb.Append(this.GetType().FullName);
			sb.Append(_tenKhachHang);
			sb.Append(_cmnd);
			sb.Append(_diaChi);

            return sb.ToString().GetHashCode();
        }

        #endregion

        #region Properties

		public virtual string TenKhachHang
        {
            get { return _tenKhachHang; }
			set
			{
				OnTenKhachHangChanging();
				_tenKhachHang = value;
				OnTenKhachHangChanged();
			}
        }
		partial void OnTenKhachHangChanging();
		partial void OnTenKhachHangChanged();
		
		public virtual string Cmnd
        {
            get { return _cmnd; }
			set
			{
				OnCmndChanging();
				_cmnd = value;
				OnCmndChanged();
			}
        }
		partial void OnCmndChanging();
		partial void OnCmndChanged();
		
		public virtual string DiaChi
        {
            get { return _diaChi; }
			set
			{
				OnDiaChiChanging();
				_diaChi = value;
				OnDiaChiChanged();
			}
        }
		partial void OnDiaChiChanging();
		partial void OnDiaChiChanged();
		
		public virtual Loaikhach Loaikhach
        {
            get { return _loaikhach; }
			set
			{
				OnLoaikhachChanging();
				_loaikhach = value;
				OnLoaikhachChanged();
			}
        }
		partial void OnLoaikhachChanging();
		partial void OnLoaikhachChanged();
		
		public virtual IList<Phieuthuephong> Phieuthuephongs
        {
            get { return _phieuthuephongs; }
            set
			{
				OnPhieuthuephongsChanging();
				_phieuthuephongs = value;
				OnPhieuthuephongsChanged();
			}
        }
		partial void OnPhieuthuephongsChanging();
		partial void OnPhieuthuephongsChanged();
		
		public virtual IList<Hoadon> Hoadons
        {
            get { return _hoadons; }
            set
			{
				OnHoadonsChanging();
				_hoadons = value;
				OnHoadonsChanged();
			}
        }
		partial void OnHoadonsChanging();
		partial void OnHoadonsChanged();
		
        #endregion
    }
}
